/**
 * Created by zhaohenry on 2017/6/11.
 */
import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './actions'

Vue.use(Vuex)

// 先写个假数据
const state = {
  tabsList: [
    {
      title: '首页',
      name: 'main',
      components: '0-0',
      closed: false
      // main: true
    }
  ],
  activeName: 'main',
  activeList: ['main'],  // 所有存在的tab的列表，方便删除及定位操作。
  spiderForm: {
    title: ''
  },
  auth: sessionStorage.getItem('auth') || false,
  endpointDB: 'http://127.0.0.1:8000',
  endpointSP: 'http://127.0.0.1:6800',
  path: '/Users/zhaohenry/PycharmProjects/nlspider/nlproject/'
}

export default new Vuex.Store({
  state,
  mutations,
  actions
})

